RelPos

class RelPos @JvmOverloads constructor(parent: Pos, p: Int = 0) : Pos

A relative Pos. Offsets a parent Pos. Mutation of this pos will alter the offset.

Author

fzzyhmstrs

Since

0.2.0

Parameters

parent

Pos - the Pos this is relative to

p

Int - the offset compared to the parent

Constructors

Link copied to clipboard
constructor(parent: Pos, p: Int = 0)

Functions

Link copied to clipboard
open override fun dec(amount: Int)

Decrements this position by the given amount

Link copied to clipboard
open override fun get(): Int

Returns the position of this pos

Link copied to clipboard
open override fun inc(amount: Int)

Increments this position by the given amount

Link copied to clipboard
open override fun set(new: Int)

Sets the position of this pos

Link copied to clipboard
open override fun toString(): String